#pragma once
#include "ServerProxy.h"

#ifndef _CENTER_PROXY_H_
#define _CENTER_PROXY_H_

class CCenterProxy	: public CServerProxy
{
public:
	CCenterProxy( CConnection* pRedirectConnection );
	~CCenterProxy(void);

protected:
	virtual xgc_void RegisteMessage();
	virtual xgc_lpvoid OnConnect( net::network_t h, xgc_lpvoid p );
	virtual xgc_void OnClose( xgc_lpvoid userdata );

private:
	xgc_void ProcessServerLoginRpn( net::network_t h, xgc_lpvoid u, const xgc_byte* data, xgc_size size );
	xgc_void ProcessGateSessionCheckRpn( net::network_t h, xgc_lpvoid u, const xgc_byte* data, xgc_size size );
private:
	struct UserSession
	{
		xgc_uint32 uid;
		xgc_byte session[SESSION_LEN];
	};

	CConnection *mRedirectConnection;
};

#endif // _CENTER_PROXY_H_